package com.bindapp.activity;

import android.content.Intent;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;

import com.bindapp.R;
import com.bindapp.model.JKGLModel;

/**
 * Created by apple on 2018/7/5.
 */

public class JKGLActivity extends BaseActivity {
    private JKGLModel model;

    @Override
    protected void after() {
        super.after();
        handerBackToolar("监控管理");
        model=new JKGLModel(JKGLActivity.this);
        AddContentView(model.getBinding().getRoot());
        baseBinding.toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
            @Override
            public boolean onMenuItemClick(MenuItem item) {
                Intent intent=null;
                switch (item.getItemId()){
                    case R.id.add:
                        intent=new Intent(JKGLActivity.this,AddDeviceActivity.class);
                        startActivity(intent);

                        break;
                }
                return false;
            }
        });
    }

    @Override
    protected void initMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_add,menu);
    }

}
